<?php
require '../../framework/bootstrap.inc.php';
global $_GPC;
//推流回调
$live_status = $_GET['action'];
$chapterstr = $_GET['id'];
$sonid = substr($chapterstr, 0, -6);
if ($live_status == 'publish') {
    //开始推流了,直播中
    //目前  sontype  1为直播  2为录播   增加 3 为直播中  一旦推流结束  将sontype改为2
    $data = ['sontype' => 3];
    pdo_update("goouc_class_son", $data, array('id' => $sonid));
} elseif ($live_status == 'publish_done') {
    //直播结束，改为录播
    $data = ['sontype' => 5, 'status' => 2];
    pdo_update("goouc_class_son", $data, array('id' => $sonid));
}